From: Florian Müllner Date: Thu, 15 Sep 2011 12:04:15 +0000 (+0200) Subject: polkit-agent: Remove hack to focus password entry X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7633 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bc0c490ec32e0c6ee5bc2712c75718d6dc38e382;p=gnome-shell.git polkit-agent: Remove hack to focus password entry As dialog buttons used to "steal" the initial key focus, the polkit dialog delayed focusing the password entry. With buttons no longer overwriting the manually set focus, this is no longer necessary. https://bugzilla.gnome.org/show_bug.cgi?id=659133 --- diff --git a/js/ui/polkitAuthenticationAgent.js b/js/ui/polkitAuthenticationAgent.js index 8ab7e480c..f5b027b70 100644 --- a/js/ui/polkitAuthenticationAgent.js +++ b/js/ui/polkitAuthenticationAgent.js @@ -142,6 +142,7 @@ AuthenticationDialog.prototype = { this._passwordEntry.clutter_text.connect('activate', Lang.bind(this, this._onEntryActivate)); this._passwordBox.add(this._passwordEntry, {expand: true }); + this.setInitialKeyFocus(this._passwordEntry); this._passwordBox.hide(); this._errorMessageLabel = new St.Label({ style_class: 'polkit-dialog-error-label' }); @@ -186,13 +187,6 @@ AuthenticationDialog.prototype = { this._session.connect('request', Lang.bind(this, this._onSessionRequest)); this._session.connect('show-error', Lang.bind(this, this._onSessionShowError)); this._session.connect('show-info', Lang.bind(this, this._onSessionShowInfo)); - - // Delay focus grab to avoid ModalDialog stealing focus with - // its buttons - this.connect('opened', - Lang.bind(this, function() { - this._passwordEntry.grab_key_focus(); - })); }, startAuthentication: function() {